package LeetCode.month01.day28;

public class No1323 {
    public static void main(String[] args) {
        System.out.println(maximum69Number(9999));
    }
    public static int maximum69Number (int num) {
        String s =num+"";
        if(s.contains("6")){
            s = s.replaceFirst("6","9");
            return Integer.parseInt(s);
        }else{
            return num;
        }

    }
}
